{% if filetype == 'Text' %}
<script type="text/javascript" src="{{MEDIA_URL}}codemirror/codemirror-2.36.js"></script>
{% endif %}

{% if filetype == 'Document' %}
<script type="text/javascript" src="{{MEDIA_URL}}js/pdf/pdf.min.js"></script>
{% endif %}

{% if filetype == 'PDF' %}
<script type="text/javascript">
var sf_file_url = "{{ raw_path|escapejs }}";
var sf_pdfworkerjs_url = '{{MEDIA_URL}}js/pdf/pdf.worker.min.js';
var sf_pdf_images_path = '{{MEDIA_URL}}js/pdf/images/';
</script>
<script type="text/javascript" src="{{MEDIA_URL}}js/pdf/pdf.min.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/pdf/viewer.js"></script>
{% endif %}

{% if filetype == 'Audio' %}
<script src="{{MEDIA_URL}}js/mediaelement-and-player.min.js"></script>
{% endif %}
{% if filetype == 'Video' %}
<script src="{{MEDIA_URL}}js/video.min.js"></script>
{% endif %}
{% if filetype == 'Markdown' %}
<script type="text/javascript" src="{{MEDIA_URL}}js/editormd/lib/marked.min.js"></script>
{% endif %}
